//
//  ASButton.h
//  AttendenceSys
//
//  Created by ld on 16/3/6.
//  Copyright © 2016年 窦芳俊. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ASNetworkEngine.h"
#import "AFHTTPSessionManager.h"
#import "FileUtil.h"

@interface ASButton : UIButton

@property(nonatomic, assign) NSInteger borderGap;
@property(nonatomic, readwrite)UIImageView *headImageView;
@property(nonatomic, strong) UIImage* image;
@property(nonatomic, assign) BOOL noMask;
- (id)initWithFrame:(CGRect)frame borderGap:(NSInteger)borderGap;

/**
 *  常用模块的图片图片现在功能，只通过url下载图片名称通过md5加密生产。
 *  图片下载功能
 *
 *  @param url              设置图片的下载地址
 *  @param placeholderImage 默认图片
 */
- (void)setImageWithURL:(NSString *)url placeholderImage:(UIImage *)placeholderImage;

/**
 *  联系人头像下载
 *
 *  @param url              地址
 *  @param placeholderImage 默认图片
 */
- (void)setContactImageWithIphone:(NSString *)iphone placeholderImage:(UIImage *)placeholderImage;

-(UIImage*)maskImage:(UIImage *)image withMask:(UIImage *)maskImage;
@end
